import { createApp } from 'vue';
import App from './App.vue';
import hospitalTop from './components/hospital_top/index.vue';
import hospitalBottom from './components/hospital_bottom/index.vue';
import Login from './components/login/index.vue';

import router from './router';

import { createPinia } from 'pinia';

import ElementPlus from 'element-plus';
// @ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
import 'element-plus/dist/index.css';

// 清除默认样式
// import '@/style/reset.scss';

// 公共样式
import './style/public.scss';

// 路由鉴权
import './permisstion';

const app = createApp(App);

// 注册全局组件
app.component('hospitalTop', hospitalTop);
app.component('hospitalBottom', hospitalBottom);
app.component('Login', Login);

// 注册路由
app.use(router);

// 注册 element-plus
app.use(ElementPlus, {
	locale: zhCn,
});

// 注册 pinia
app.use(createPinia());

app.mount('#app');
